-
Notifications
You must be signed in to change notification settings - Fork 256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🎪 Change the way platforms are imported ⚠️ DO NOT MERGE ⚠️ #93
base: master
Are you sure you want to change the base?
Conversation
module.exports.SlackPlatform = SlackPlatform; | ||
module.exports.TelegramPlatform = TelegramPlatform; | ||
module.exports.TwilioPlatform = TwilioPlatform; | ||
module.exports.ViberPlatform = ViberPlatform; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this can be one object
module.exports = {
AlexaPlatform: AlexaPlatform,
...
};
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
} | ||
} | ||
|
||
module.exports = ViberPlatform; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we compare the platform.js
for all of these platforms we come to an identical structure, with the difference in just its parameters and enabled template()
~
maybe it can be a single object, with different params and a templates enabled or disabled
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can, but the point is that this can be fully customized by any new plugin. We can probably create a base class and extend it.
Goal: update the structure so we can import new platforms without adding them to the core and add plugin support.
To do: